const fs = require('fs')

let src = '../pics'

let files = fs.readdirSync(src);

let requires = '';

files.forEach(f => {
    console.log(f);
    requires += `
        "${f}" : require("./pics/${f}"),
    `
})

fs.writeFileSync('../pics.js', `
    export default pics = {
        ${requires}
    }
`)